import React, { Component } from "react";
// 引入classNames
import classNames from "classnames/bind";
// 引入css，同时取一个变量
import styles from "./05-style.css";

let cx = classNames.bind(styles);

class App extends Component {
  render() {
    let className = cx({
      // 左边是类名，右边是表达式
      red: this.props.count === "2",
      blue: false,
      big: true,
    });
    return (
      <>
        <h3>className</h3>
        <p className={className}>hello React!</p>
      </>
    );
  }
}

export default App;
